<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
  <meta charset="UTF-8">
  <title>借卖方基本信息</title>
  <style>
    body {
      font-family: 'Arial', sans-serif;
      background-color: #222;
      color: #eee;
      padding: 30px;
    }

    h2 {
      color: #ff9800;
      margin-bottom: 30px;
      text-align: center;
    }

    .form-container {
      background-color: #333;
      border-radius: 5px;
      padding: 25px;
      max-width: 500px;
      margin: 0 auto;
      box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
    }

    .form-group {
      margin-bottom: 20px;
      display: flex;
      align-items: center;
    }

    label {
      font-weight: bold;
      width: 120px;
      color: #ff9800;
    }

    .form-control {
      flex-grow: 1;
      padding: 10px;
      border: none;
      background-color: #444;
      color: #eee;
      border-radius: 3px;
      box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
    }
    .form-control:disabled{
      background-color: #666;
    }

    .btn-custom {
      background-color: #ff9800;
      color: #222;
      border: none;
      padding: 12px 25px;
      border-radius: 3px;
      font-weight: bold;
      cursor: pointer;
      transition: background-color 0.3s ease;
    }

    .btn-custom:hover {
      background-color: #ff7800;
    }
  </style>
</head>
<body>

<h2>借卖方基本信息</h2>

<div class="form-container">
  <form action="${pageContext.request.contextPath}/user/update" method="post">
    <input type="hidden" name="id" value="${user.id}">

    <div class="form-group">
      <label for="username">用户名：</label>
      <input type="text" class="form-control" id="username" name="username" value="${user.username}" required disabled>
    </div>

    <div class="form-group">
      <label for="password">密码：</label>
      <input type="password" class="form-control" id="password" name="password" value="${user.password}" required>
    </div>

    <div class="form-group">
      <label for="phone">电话：</label>
      <input type="text" class="form-control" id="phone" name="phone" value="${user.phone}" required>
    </div>

    <div class="form-group">
      <label for="email">电子邮件：</label>
      <input type="email" class="form-control" id="email" name="email" value="${user.email}" required>
    </div>

    <button type="submit" class="btn-custom">保存修改</button>
  </form>
</div>
<script>
  <c:if test="${not empty successMessage}">
  alert("${successMessage}");
  </c:if>
</script>
</body>

</html>